package com.itany.cloud.exception;

import com.alibaba.csp.sentinel.slots.block.BlockException;
import com.itany.cloud.util.ResponseResult;

/**
 * @author 石小俊
 * 处理Sentinel全局异常
 */
public class GlobalSentinelException {

    /**
     * 该方法必须使用static修饰
     * @param e
     * @return
     */
    public static ResponseResult handlerException(BlockException e) {
        return ResponseResult.fail("全局Sentinel异常,异常为:" + e);
    }

}
